package com.eastfair.questionnaire.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;

import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 实体类
 * 问题
 * </p>
 *
 * @author yuwx
 * @since 2021-08-18
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "QuestionVO", description = "问题")
@AllArgsConstructor
public class QuestionVO extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;

    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目ID
     */
    @ApiModelProperty(value = "项目ID")

    @Excel(name = "项目ID")
    private Long projectId;

    /**
     * 问卷名
     */
    @ApiModelProperty(value = "问卷名")

    @Excel(name = "问卷名")
    private Long questionnaireId;

    /**
     * 下一题
     */
    @ApiModelProperty(value = "下一题")

    @Excel(name = "下一题")
    private Long nextQuestionId;

    /**
     * 题型
     */
    @ApiModelProperty(value = "题型")
    @Size(max = 20, message = "题型长度不能超过20")

    @Excel(name = "题型")
    private String questionType;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")

    @Excel(name = "排序")
    private Integer sequence;

    /**
     * 问题名称
     */
    @ApiModelProperty(value = "问题名称")
    @Size(max = 128, message = "问题名称长度不能超过128")

    @Excel(name = "问题名称")
    private String name;

    /**
     * 问题英文名称
     */
    @ApiModelProperty(value = "问题英文名称")
    @Size(max = 128, message = "问题英文名称长度不能超过128")

    @Excel(name = "问题英文名称")
    private String enName;

    /**
     * 问题别名
     */
    @ApiModelProperty(value = "问题别名")
    @Size(max = 128, message = "问题别名长度不能超过128")

    @Excel(name = "问题别名")
    private String aliasName;

    /**
     * 问题英文别名
     */
    @ApiModelProperty(value = "问题英文别名")
    @Size(max = 128, message = "问题英文别名长度不能超过128")

    @Excel(name = "问题英文别名")
    private String enAliasName;

    /**
     * 问题描述
     */
    @ApiModelProperty(value = "问题描述")
    @Size(max = 128, message = "问题描述长度不能超过128")

    @Excel(name = "问题描述")
    private String description;

    /**
     * 必填
     */
    @ApiModelProperty(value = "必填")

    @Excel(name = "必填", replace = {"是_true", "否_false", "_null"})
    private Integer isRequired;

    /**
     * 多选
     */
    @ApiModelProperty(value = "多选")

    @Excel(name = "多选", replace = {"是_true", "否_false", "_null"})
    private Integer isMulti;

    /**
     * 选择答案数量下限
     */
    @ApiModelProperty(value = "选择答案数量下限")
    private Integer selectLower;
    /**
     * 选择答案数量上限
     */
    @ApiModelProperty(value = "选择答案数量上限")
    private Integer selectUpper;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")

    @Excel(name = "是否生效(默认1：可用 0:不可用)", replace = {"是_true", "否_false", "_null"})
    private Integer isEnabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")

    @Excel(name = "是否删除(默认0：未删除 1:已删除)", replace = {"是_true", "否_false", "_null"})
    private Integer isDeleted;

    /**
     * 答案
     */
    @ApiModelProperty(value = "答案")
    @Excel(name = "答案")
    private List<AnswerVO> answerList;

}
